package com.ship.dispatch.service.bpm;

import com.ship.common.core.web.domain.JsonResult;
import com.ship.dispatch.bpm.service.ProcessInstanceService;
import com.ship.system.api.BpmInstanceService;
import com.ship.system.api.model.ProcessInstanceParam;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@Validated
public class BpmInstanceServiceApi implements BpmInstanceService {

    @Resource
    ProcessInstanceService processInstanceService;
    @Override
    public String startProcessInstance(ProcessInstanceParam param) {
        //启动流程
        String result = processInstanceService.createProcessInstance2(param.getBpmKey(),param.getParams(),param.getBussinessId()+"");
        return result;
    }
}
